home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Sample Code / MPW IIGS SC / SC.020.DTS.Tools.Libs / pmUserTool.aii < prev    next >
Encoding:
Text File  |  1990-06-24  |  1.7 KB  |  108 lines  |  [TEXT/MPS ]

  1. **************************************************************************
  2. *
  3. * User-Toolset shell for Apple IIgs pixelMap2Rgn code
  4. *
  5. * David A. Lyons
  6. *
  7. * Developer Technical Support Apple II Sample Code
  8. *
  9. * v3.0    20-Apr-90 DAL
  10. *
  11. **************************************************************************
  12. *
  13. * How to build this thing:
  14. *    asmiigs pixelmap2rgn.aii
  15. *    asmiigs pmusertool.aii
  16. *    linkiigs pmusertool.aii.obj pixelmap2rgn.aii.obj -o pixMapTool -t $ba
  17. *
  18. **************************************************************************
  19.     case on
  20.  
  21. Version    equ $0100    ;v1.0
  22.  
  23. pmUserTool    proc
  24.  
  25.     import pixelMap2Rgn, newPort, killPort
  26.  
  27. ptrTable    dc.l (ptrTableEnd-ptrTable)/4
  28.     dc.l fNoError-1        ;$01xx BootInit
  29.     dc.l fNoError-1        ;$02xx StartUp
  30.     dc.l fNoError-1        ;$03xx ShutDown
  31.     dc.l fVersion-1        ;$04xx Version
  32.     dc.l fNoError-1        ;$05xx Reset
  33.     dc.l fStatus-1        ;$06xx Status
  34.     dc.l fNoError-1        ;$07xx reserved
  35.     dc.l fNoError-1        ;$08xx reserved
  36.     dc.l fPixelMap2Rgn-1    ;$09xx pixelMap2Rgn
  37.     dc.l fNewPort-1        ;$0Axx newPort
  38.     dc.l fKillPort-1        ;$0Axx killPort
  39. ptrTableEnd
  40. *
  41. save6    lda >myStatus
  42.     beq notStarted
  43.     plx
  44.     pla
  45.     sta >temp
  46.     pla
  47.     sta >temp+2
  48.     pla
  49.     sta >temp+4
  50.     phx
  51.     rts
  52.  
  53. temp    ds.b 6
  54.  
  55. myStatus    ds.w 1
  56.  
  57. notStarted    pla    ;discard return address
  58.     txa
  59.     xba
  60.     and #$FF00
  61.     ora #$8001
  62.     sec
  63.     rtl
  64.  
  65. fStartUp    lda #$FFFF
  66.     bra startStop
  67.  
  68. fShutDown    lda #$0000
  69. startStop    sta >myStatus
  70. fNoError    lda #0
  71.     clc
  72.     rtl
  73.  
  74. fVersion    lda #Version
  75.     sta 7,s
  76.     bra fNoError
  77.  
  78. fStatus    lda >myStatus
  79.     sta 7,s
  80.     bra fNoError
  81.  
  82. ********************
  83.  
  84. fPixelMap2Rgn    jsr save6
  85.     jsl pixelMap2Rgn
  86.     bra restore6    
  87.  
  88. fNewPort    jsr save6
  89.     jsl newPort
  90.     bra restore6    
  91.  
  92. fKillPort    jsr save6
  93.     jsl killPort
  94.  
  95. restore6    tay    ;This is here so everybody
  96.     lda >temp+4    ;can reach it.
  97.     pha
  98.     lda >temp+2
  99.     pha
  100.     lda >temp
  101.     pha
  102.     tya
  103.     rtl
  104.  
  105.     endp
  106.  
  107.     END
  108.